package com.smartfactory.sail.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.smartfactory.sail.entity.enums.OrderItemTypeEnum;
import com.smartfactory.sail.entity.enums.OrderModelEnum;
import com.smartfactory.sail.entity.enums.OrderSampleStatusEnum;
import com.smartfactory.sail.entity.enums.OrderStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author 王巨壁
 * @since 2019-07-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Order对象", description="订单表")
@TableName("`order`")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "订单编号")
    @TableField("orderCode")
    private String orderCode;

    @ApiModelProperty(value = "订单类型1样品订单2合同订单")
    @TableField("orderType")
    private OrderItemTypeEnum orderType;

    @ApiModelProperty(value = "订单模式1.生产订单2修磨订单3外包订单4混合订单具体参考constants表")
    @TableField("orderMode")
    private OrderModelEnum orderMode;

    @ApiModelProperty(value = "如果是合同订单这个字段必填合同id")
    @TableField("contractId")
    private Long contractId;

    @ApiModelProperty(value = "客户id可能为空,样品订单无需客户")
    @TableField("custId")
    private Long custId;

    @ApiModelProperty(value = "联系人名称")
    @TableField("contactsName")
    private String contactsName;

    @ApiModelProperty(value = "联系方式")
    @TableField("contactInformation")
    private String contactInformation;

    @ApiModelProperty(value = "企业地址")
    @TableField("custAddr")
    private String custAddr;

    @ApiModelProperty(value = "订单状态")
    private OrderStatusEnum status;

    @ApiModelProperty(value = "样品订单状态")
    @TableField("sampleStatus")
    private OrderSampleStatusEnum sampleStatus;

    @ApiModelProperty(value = "下单人id对应userid")
    @TableField("underOrderId")
    private Long underOrderId;

    @ApiModelProperty(value = "交货日期")
    @TableField("deliveryDate")
    private String deliveryDate;

    @ApiModelProperty(value = "创建人")
    @TableField("createUser")
    private String createUser;

    @ApiModelProperty(value = "创建时间yyyy-MM-dd HH:mm:ss")
    @TableField("createTime")
    private String createTime;

    @ApiModelProperty(value = "修改人")
    @TableField("updateUser")
    private String updateUser;

    @ApiModelProperty(value = "更新时间yyyy-MM-dd HH:mm:ss")
    @TableField("updateTime")
    private String updateTime;


}
